package com.active.dao;

import com.active.bean.ActiveInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ActiveInfoMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(ActiveInfo record);

    int insertSelective(ActiveInfo record);

    ActiveInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ActiveInfo record);

    int updateByPrimaryKey(ActiveInfo record);

    List<ActiveInfo> selectByActiveListId(Integer listId);

    List<ActiveInfo> selectByUserAndActiveListId(@Param("listId") Integer listId, @Param("userId") int userId);

    int updateStopMissionByListId(Integer id);

    int checkMissionFinished(Integer activeListId);

    int deleteByActiveListId(Integer activeListId);
}